package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.system.domain.PStoreProduct;
import com.ruoyi.system.domain.vo.PStoreProductVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品Mapper接口
 *
 * @author ruoyi
 * @date 2022-08-01
 */
public interface PStoreProductMapper extends BaseMapperPlus<PStoreProductMapper, PStoreProduct, PStoreProductVo> {

    /**
     * 自定义商品查询
     */
    Page<PStoreProduct> selectVoMyPage(@Param("build") Page<PStoreProduct> build, @Param("ew") Wrapper<PStoreProduct> lqw);

    /**
     * 前端-商品查询
     */
    PStoreProduct selectByLeftId(Integer productId);

    /**
     * 自定义分页查询
     * @param build
     * @param lqw
     * @return
     */
    Page<PStoreProduct> selectListCustom(@Param("build") Page<PStoreProduct> build, @Param("ew") Wrapper<PStoreProduct> lqw);

    /**
     * 前端-商品详情
     */
    PStoreProductVo selectFontVoById(Long id);

    /**
     * 积分商城列表查询
     * @param pageQuery
     * @return
     */
    List<PStoreProduct> integralProductList(@Param("pageQuery") PageQuery pageQuery);
}
